{load_language_text section="checkout_payment"}
{load_language_text section="buttons" name="button"}
{config_load file="$language/gm_lang_$language.conf" section="lightbox"}


<!-- PAYMENT -->
{if $LIGHTBOX == 'true'}<div id="lightbox_content" style="display:none">{/if}
	<div class="order_payment{if $LIGHTBOX == 'true'} lightbox_block{/if}">

		{$FORM_ACTION}

		<div class="process_bar">
			<ul>
				<li><label><span>{$txt.text_shoppingcart}</span></label></li>
				<li><label><span>{$txt.text_yourdata}</span></label></li>
				<li class="active"><label><span>{$txt.text_shipandpay}</span></label></li>
				<li><label><span>{$txt.text_confirm}</span></label></li>
			</ul>
		</div>
		<h1>{$txt.text_payment_info}</h1>

		{if $error!=''}<div class="errorText">{$error}</div>{/if}

		<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/address.png" alt="" />{$txt.title_address}</h2>
		<div class="invoice_address">
			<p>{$txt.text_address}</p>
			<p class="address">
				{$ADDRESS_LABEL}<br /><br />
				<a class="button_blue button_set" href="{'checkout_payment_address.php'|xtc_href_link:'':'SSL'}"><span class="button-outer"><span class="button-inner">{$button.address_change}</span></span></a>
			</p>
		</div>

		<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/payment.png" alt="" />{$txt.heading_payment}</h2>
		<div class="items">
			
			{if $GV_COVER != 'true'}
				<p>{$txt.text_payment}</p>
				{$PAYMENT_BLOCK}{$module_gift}
			{else}
				<input type="hidden" name="cot_gv" value="on" />
				<p>{$txt.text_gccover}</p>
			{/if}

		</div>

		<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/comments.png" alt="" />{$txt.title_comments}</h2>
		<div class="remarks">
			<p>{$txt.text_comments}</p>

			<textarea id="comments_textarea" name="{$COMMENTS_NAME}" wrap="{$COMMENTS_WRAP}" class="input-textarea">{$COMMENTS_VALUE}</textarea>
			<input type="hidden" name="{$COMMENTS_HIDDEN_NAME}" value="{$COMMENTS_HIDDEN_VALUE}" />
		</div>


		{if $WITHDRAWAL}
		<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/secrecy.png" alt="" /> {$txt.title_withdrawal}</h2>
		<div class="remarks">
			{if $CHECKBOX_WITHDRAWAL}
				<p>{$txt.text_withdrawal}</p>
			{/if}

			{if $WITHDRAWAL_IFRAME == 1}
				<iframe src="{$WITHDRAWAL_IFRAME_URL}"></iframe>
			{else}
				<textarea name="{$withdrawal_data.NAME}" class="input-textarea {$withdrawal_data.CLASS}" readonly="readonly">{$withdrawal_data.TEXT}</textarea>
			{/if}

			{if $CHECKBOX_WITHDRAWAL}
				<div class="accept_box"><div class="accept_box_checkbox">{$CHECKBOX_WITHDRAWAL}</div><div class="accept_box_text">{$txt.text_accept_withdrawal}</div></div>
			{/if}
		</div>
		{/if}

		{if $AGB}
		<h2 class="underline overline"><img class="png-fix" src="{$tpl_path}img/icons/secrecy.png" alt="" /> {$txt.title_agb}</h2>
		<div class="remarks">
			{if $CHECKBOX_AGB}
				<p>{$txt.text_agb}</p>
			{/if}

			{if $AGB_IFRAME == 1}
				<iframe src="{$AGB_IFRAME_URL}"></iframe>
			{else}
				<textarea name="{$conditions_data.NAME}" class="input-textarea {$conditions_data.CLASS}" readonly="readonly">{$conditions_data.TEXT}</textarea>
			{/if}

			{if $CHECKBOX_AGB}
				<div class="accept_box"><div class="accept_box_checkbox">{$CHECKBOX_AGB}</div><div class="accept_box_text">{$txt.text_accept_agb}</div></div>
			{/if}
		</div>
		{/if}
		<br/><br/>

		{* TODO: write action_page_back handler *}
		<div class="back_button"><a href="{'checkout_shipping.php'|xtc_href_link:'':'SSL'}" class="button_grey_big button_set_big action_page_back"><span class="button-outer"><span class="button-inner">{$button.back}</span></span></a></div>
		{* TODO: use xtc_href_link plugin *}
		<div class="continue_button"><a href="{page_url}#" class="button_green_big button_set_big action_submit"><span class="button-outer"><span class="button-inner"><img class="png-fix" src="{$tpl_path}img/icons/icon-white-shoppingcart.png" alt="" style="margin-right:10px; float:left" />{$button.continue}</span></span></a></div>

		{$FORM_END}
	</div>
{if $LIGHTBOX == 'true'}
	<a href="{$LIGHTBOX_CLOSE}" class="icon_lightbox_close_checkout button_close_lightbox" title="{$button.close}">{$button.close}</a>
</div>
{/if}
